package com.share.simpleFactory.calculator;

public class Div extends Operation{
    @Override
    public double getResult(double num1, double num2){
        if (num1 == 0){
            System.out.println("除数不能为0");

            throw new ArithmeticException();
        }
        return num1 / num2;
    }
}
